<template>
	<div id="noteDetail">
		<div class="nodeDetail_top">
			<i class="el-icon-arrow-left" @click="goBack"></i>
			<span class="nodeDetail_top_title">{{data.title}}</span>
		</div>
		<div class="nodeDetail_bd">
			<p class="nodeDetail_bd_1" v-html="data.content">{{data.content}}</p>
		</div>

		<div class="notes_ft">
			<ul>
				<li class="ul_li1" @click="routerTo(data.id,data.title,data.content)">编辑</li>
			</ul>
		</div>
	</div>
</template>

<script>
	export default {
		name: 'noteDetail',
		data() {
			return {
				data: {}

			}
		},
		methods: {
			goBack() {
				history.back(-1)
			},

			routerTo(thisid, thistitle, thiscontent) {
				this.$router.push({
					path: 'Editors',
					query: {
						thisid: thisid,
						thistitle: thistitle,
						thiscontent: thiscontent
					}
				})
			},

		},
		created() {
			let res = '';
			let code = '';
			let _this = this;
			let params = {
				id: this.$route.query.id
			}
			this.$post("/app/post/AppMyNoteController/queryNoteContent", params).then((json) => {
				if (json.returnCode == 0) {
					_this.data = json.bean
				} else {
					this.$message({
						message: json.returnMessage
					});
				}
			});
		}
	}
</script>

<style scoped="noteDetail">
	#app {
		width: 100%;
		height: 100%;
	}

	.nodeDetail_top {
		width: 100%;
		height: 0.45rem;
		display: flex;
		position: fixed;
		z-index: 999;
		background-color: lightblue;
	}

	.el-icon-arrow-left {
		font-size: 0.3rem;
		margin-top: 0.1rem;
		margin-left: 0.1rem;
	}

	.nodeDetail_top_title {
		display: block;
		width: 3.35rem;
		text-align: center;
		font-size: 0.2rem;
		margin-top: 0.08rem;

	}

	.nodeDetail_bd {
		width: 100%;
		height: 100%;
		padding-top: 45px;
	}

	.nodeDetail_bd_1 {
		width: 90%;
		margin: auto;
		margin-top: 5px;
		color: darkolivegreen;
		font-size: 15px;
		font-family: "宋体";
	}

	.notes_ft {
		width: 100%;
		height: 0.5rem;
		background-color: white;
		position: fixed;
		z-index: 999;
		bottom: -0.01rem;
		border-top: 1px solid gainsboro;
	}

	.ul_li1 {
		width: 20%;
		height: 100%;
		text-align: center;
		padding-top: 0.15rem;
	}
</style>
